package indi.zhifa.study2025.oa.common.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.time.Duration;

@Data
public class PasswdProperties {
    /**
     * 加密强度
     */
    Integer strength;
    /**
     * 默认密码
     */
    String defaultPasswd;
    /**
     * 过期时间
     */
    //Long expireDay;
    /**
     * 客户端传输的账号名密码是否加密
     */
    Boolean encrypt;

    /**
     * 默认密码过期时间
     */
    Duration defaultPwdExpireTime;

    Integer randomPwdLength;

    public PasswdProperties() {
        strength = 4;
        defaultPasswd = "csz@2025";
        encrypt = false;
        defaultPwdExpireTime = Duration.ofDays(365);
        randomPwdLength = 8;
    }
}
